package com.javasm.crm.service.aftersale.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.javasm.crm.domin.entity.aftersale.RefacInGoods;
import com.javasm.crm.mapper.aftersale.RefacInGoodsMapper;
import com.javasm.crm.service.aftersale.IRefacInGoodsService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.sql.Wrapper;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lirui
 * @since 2021-07-11
 */
@Service
@Transactional
public class RefacInGoodsServiceImpl extends ServiceImpl<RefacInGoodsMapper, RefacInGoods> implements IRefacInGoodsService {

    @Override
    public List<RefacInGoods> getInGoodWithInApplyId(Integer id) {

        QueryWrapper<RefacInGoods> wrapper = new QueryWrapper<>();
        LambdaQueryWrapper<RefacInGoods> lambda = wrapper.lambda();

        lambda.eq(RefacInGoods::getIdoId,id);

        List<RefacInGoods> list = list(wrapper);

        return list;
    }
}
